package com.zhixiang.core.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.zhixiang.core.command.QueryFilter;
import com.zhixiang.core.entity.TreeObj;
import com.zhixiang.core.web.paging.PagingBean;

public interface BaseDao<T, PK extends Serializable> {
	public T save(T paramT);

	public T merge(T paramT);

	public T get(PK paramPK);

	public void remove(PK paramPK);

	public void remove(T paramT);

	public void evict(T paramT);

	public List<T> getAll();

	public List<T> getAll(PagingBean paramPagingBean);

	public List<T> getAll(QueryFilter paramQueryFilter);

	public List<T> findByHql(String paramString,
			Object[] paramArrayOfObject);

	public List<T> findByHql(String paramString,
			Object[] paramArrayOfObject, PagingBean paramPagingBean);

	public List<T> findByHql(String paramString,
			Object[] paramArrayOfObject, int paramInt1, int paramInt2);

	public void flush();

	public Long update(String paramString, Object[] paramArrayOfObject);
	
    public T uniqueResult(final String queryString, final Object values[]);
    
    public List<TreeObj> getTreeObj(PK id , String displayName,Map<String,String> map);
}